# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'databaseManagment.ui'
#
# Created: Fri Jun 01 00:52:25 2012
#      by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui
import pl.edu.budgetanalizer.GUI.databaseManagment.categories.CategoryManagment
import pl.edu.budgetanalizer.GUI.databaseManagment.measures.MeasureManagment
import pl.edu.budgetanalizer.GUI.databaseManagment.producers.ProducerManagment
import pl.edu.budgetanalizer.GUI.databaseManagment.products.ProductManagment

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    _fromUtf8 = lambda s: s

class Ui_Form(QtGui.QWidget):
    
    def openCategoryManagement(self):
        self.categoryManagmentWidget = pl.edu.budgetanalizer.GUI.databaseManagment.categories.CategoryManagment.Ui_Form(self)
        self.categoryManagmentWidget.setupUi(self.categoryManagmentWidget,self.databaseDir)
        self.categoryManagmentWidget.setGeometry(QtCore.QRect(0, 0, 461, 511))
        self.categoryManagmentWidget.setAutoFillBackground(True)
        self.categoryManagmentWidget.show()
        
    
    def openProducerManagement(self):
        self.producerManagmentWidget = pl.edu.budgetanalizer.GUI.databaseManagment.producers.ProducerManagment.Ui_Form(self)
        self.producerManagmentWidget.setupUi(self.producerManagmentWidget,self.databaseDir)
        self.producerManagmentWidget.setGeometry(QtCore.QRect(0, 0, 461, 511))
        self.producerManagmentWidget.setAutoFillBackground(True)
        self.producerManagmentWidget.show()
        
    
    def openMeasureManagement(self):
        self.measureManagmentWidget = pl.edu.budgetanalizer.GUI.databaseManagment.measures.MeasureManagment.Ui_Form(self)
        self.measureManagmentWidget.setupUi(self.measureManagmentWidget,self.databaseDir)
        self.measureManagmentWidget.setGeometry(QtCore.QRect(0, 0, 461, 511))
        self.measureManagmentWidget.setAutoFillBackground(True)
        self.measureManagmentWidget.show()
    
    def openProductManagement(self):
        self.productManagmentWidget = pl.edu.budgetanalizer.GUI.databaseManagment.products.ProductManagment.Ui_Form(self)
        self.productManagmentWidget.setupUi(self.productManagmentWidget,self.databaseDir)
        self.productManagmentWidget.setGeometry(QtCore.QRect(0, 0, 461, 511))
        self.productManagmentWidget.setAutoFillBackground(True)
        self.productManagmentWidget.show()
    
    def setupUi(self, Form,databaseDir):
        self.databaseDir = databaseDir
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(375, 395)
        self.verticalLayoutWidget = QtGui.QWidget(Form)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(20, 30, 181, 331))
        self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.categoryButton = QtGui.QPushButton(self.verticalLayoutWidget)
        self.categoryButton.setMinimumSize(QtCore.QSize(0, 40))
        self.categoryButton.setObjectName(_fromUtf8("categoryButton"))
        self.categoryButton.connect(self.categoryButton, QtCore.SIGNAL("clicked()"),self.openCategoryManagement)
        self.verticalLayout.addWidget(self.categoryButton)
        self.producerButton = QtGui.QPushButton(self.verticalLayoutWidget)
        self.producerButton.setMinimumSize(QtCore.QSize(0, 40))
        self.producerButton.setObjectName(_fromUtf8("producerButton"))
        self.producerButton.connect(self.producerButton, QtCore.SIGNAL("clicked()"),self.openProducerManagement)
        self.verticalLayout.addWidget(self.producerButton)
        self.productButton = QtGui.QPushButton(self.verticalLayoutWidget)
        self.productButton.setMinimumSize(QtCore.QSize(0, 40))
        self.productButton.setObjectName(_fromUtf8("productButton"))
        self.productButton.connect(self.productButton, QtCore.SIGNAL("clicked()"),self.openProductManagement)
        self.verticalLayout.addWidget(self.productButton)
        self.measureButton = QtGui.QPushButton(self.verticalLayoutWidget)
        self.measureButton.setMinimumSize(QtCore.QSize(0, 40))
        self.measureButton.setObjectName(_fromUtf8("measureButton"))
        self.measureButton.connect(self.measureButton, QtCore.SIGNAL("clicked()"),self.openMeasureManagement)
        self.verticalLayout.addWidget(self.measureButton)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.categoryButton.setText(QtGui.QApplication.translate("Form", "Dodaj kategorie", None, QtGui.QApplication.UnicodeUTF8))
        self.producerButton.setText(QtGui.QApplication.translate("Form", "Dodaj producenta", None, QtGui.QApplication.UnicodeUTF8))
        self.productButton.setText(QtGui.QApplication.translate("Form", "Dodaj produkt", None, QtGui.QApplication.UnicodeUTF8))
        self.measureButton.setText(QtGui.QApplication.translate("Form", "Dodaj jednostke", None, QtGui.QApplication.UnicodeUTF8))

